/**
 * 
 */
package net.toocruel.iqismart.entity.constants;

import java.util.HashSet;
import java.util.Set;

/**
 * @author toocruel
 *
 */
public enum NotificationType {

	FOLLOW_USER("当有人关注我时"),//
	INVITE_ANSWER("当有人邀请我回答问题时"),//
	ANSWER_QUESTION("当有人回答我的问题时"),//
	COMMENT_QUESTION("当有人评论我的问题时"),//
	COMMENT_ARTICLE("当有人评论我的文章时"),//
	ADOPT_ANSWER("当有人采纳我的回答时"),//
	COMMENT_ANSWER("当有人评论我的回答时"),//
	REPLY_COMMENT("当有人回复我的评论时");//  ;

	private String name ;

	NotificationType(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static Set<NotificationType> defaultSiteNotifications(){
		Set<NotificationType> set = new HashSet<>();
		set.add(NotificationType.FOLLOW_USER);
		set.add(NotificationType.INVITE_ANSWER);
		set.add(NotificationType.COMMENT_QUESTION);
		set.add(NotificationType.COMMENT_ARTICLE);
		set.add(NotificationType.ADOPT_ANSWER);
		set.add(NotificationType.COMMENT_ANSWER);
		set.add(NotificationType.REPLY_COMMENT);
		return set;
	}

	public static Set<NotificationType> defaultEmailNotifications(){
		Set<NotificationType> set = new HashSet<>();
		set.add(NotificationType.INVITE_ANSWER);
		set.add(NotificationType.ADOPT_ANSWER);
		return set;
	}


}
